package packets.server;

import java.io.Serializable;
import java.net.InetAddress;
import java.security.PublicKey;


/**
 * a data structure that contains the {@link Certificate} information,
 * user's id , public key , IP address , and port 
 */
public class CertificateData implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private int _id;
	private PublicKey _key;
	private InetAddress _ip;
	private int _port;
	public CertificateData(int id, PublicKey key, InetAddress ip , int port){
		_id = id;
		_key = key;
		_ip = ip;
		_port = port;
	}
	/**
	 * 
	 * @return the user's ID
	 */
	public int getId() {
		return _id;
	}
	/**
	 * 
	 * @return the user's public key
	 */
	public PublicKey getKey() {
		return _key;
	}
	/**
	 * 
	 * @return the user's IP address
	 */
	public InetAddress getIp() {
		return _ip;
	}
	/**
	 * 
	 * @return the user's chat port
	 */
	public int getPort() {
		return _port;
	}
}
